<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="VentaViewDlg" widgetVar="VentaViewDialog" modal="true" resizable="false"  appendTo="@(body)" header="#{myBundle.ViewVentaTitle}" closeOnEscape="true">

            <h:form id="VentaViewForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2" columnClasses="column" rendered="#{ventaController.selected != null}">

                        <h:outputText value="#{myBundle.ViewVentaLabel_codigo}"/>
                        <h:outputText value="#{ventaController.selected.codigo}" title="#{myBundle.ViewVentaTitle_codigo}"/>

                        <h:outputText value="#{myBundle.ViewVentaLabel_fecha}"/>
                        <h:outputText value="#{ventaController.selected.fecha}" title="#{myBundle.ViewVentaTitle_fecha}">
                            <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                        </h:outputText>

                        <h:outputText value="#{myBundle.ViewVentaLabel_monto}"/>
                        <h:outputText value="#{ventaController.selected.monto}" title="#{myBundle.ViewVentaTitle_monto}"/>

                        <h:outputText value="#{myBundle.ViewVentaLabel_codpersona}"/>
                        <h:outputText value="#{ventaController.selected.codpersona.codigo}"/>
                    </p:panelGrid>
                    <p:commandButton value="#{myBundle.Close}" onclick="VentaViewDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
